LinearGauge for ASP.NET Web Forms
Adding Logarithmic Markers
Task-Based Help > Adding Logarithmic Markers

In this step you will add Logarithmic Markers to the C1LinearGauge control. The following steps assume you have already added a C1LinearGauge control to the page.

In Design View

Complete the following steps to add labels to the C1LinearGauge control in the Design View:

  1. Right click on the control and select Properties.
  2. In the Property Window, expand the Behavior property.
  3. Set Islogarithmic to “True”.
  4. Set the LogarithmicBase as desired.

In Source View

To add Logarithmic Markers to the C1LinearGauge control in the Source View, modify the <cc1:C1LinearGauge> tag, as shown below:

To write code in Source View

<cc1:C1LinearGauge ID="C1LinearGauge1" runat="server" Islogarithmic="True" LogarithmicBase="20">

Set the “Islogarithmic” to True and “LogarithmicBase” as desired.

In Code

To add Logarithmic Markers to the C1LinearGauge control, add the following code to the Page_Load event:

To write the code in Visual Basic:

Visual Basic
Copy Code
'Enable Logarithmic Markers
C1LinearGauge1.Islogarithmic = True
'Set the C1LinearGauge’s LogarithmicBase
C1LinearGauge1.LogarithmicBase = 20

To write the code in C#:

C#
Copy Code
//Enable Logarithmic Markers
C1LinearGauge1.Islogarithmic = true;
//Set the C1LinearGauge’s LogarithmicBase
C1LinearGauge1.LogarithmicBase = 20;


What You've Accomplished
When you run your application, observe that your gauge appears as shown in the following image:

See Also